from django.contrib import admin

# Register your models here.
from starday.models import *

admin.site.register(SDCategory)
admin.site.register(SDRichPart)


class EventAdmin(admin.ModelAdmin):
    list_display = ["date_str", "category", "language", "parts"]

    def parts(self, obj):
        return ''.join([x.text for x in obj.event_parts.all()])


admin.site.register(SDEvent, EventAdmin)
